Multiplayer Submarine Game

After my first term of CST, I was itching to make games again during my 3 week winter break.
Right as I got home from my last final exam, I opened Unity and hit "New 3D Project."

Creating the Game Idea

Working in a team is often so much easier, especially for coming up with creative ideas and solutions.
My friends and I came up with a strategy to come up with many low-scope game ideas, so that the best one can be developed over this 3 week winter break.

  • Our strategy we call "stressful thinking"
  • 1 random word is picked. For example, frying pan
  • A 3 minute timer is started, and everyone in the group builds off the idea
    • Very much a "yes, and" approach, where no idea is discarded
  • After the 3 minutes is up, you pick another word at random, and you leave that idea as it is
    • Good ideas very clearly stand out from the bad ones, but since each idea only takes 3 minutes to create, you dont grow attachment to any of the bad ones.

All the stressful thinking sessions we did went to waste, since I decided on an entirely different idea and got so attached and excited about it, I had to do it (THIS WAS A MISTAKE. The idea was far too high-scoped).

The Game Idea

The original game idea compared to what became of it later on are quite different, so I'll split them up here.

Original Game Idea

My original idea for the game was a 4 player co-op multiplayer, where you and your friends are all inside a submarine with no windows.

Player Roles

A player can control the submarine, and must navigate it through randomly generated underwater terrain to reach several destinations.

Another player could control a robotic arm (much like the Canadarm2) that could collect rocks, debris, and plants to be brought into the submarine.

The other 2 players would help keep the submarines engine working, by providing it fuel and coolant crafter from the debris and plants brought in by the arm.

Goal

The rocks the robotic arm bring into the submarine can be drilled into. They have a chance to have a rare metal inside.
The goal of the game is to navigate the submarine to the POIs (points of interest) and deposit a certain value of rare metals collected from the rocks along the way.
The lose state would be running out of fuel / overheating due to lack of coolant.

Final Game Idea

This section is meant to be read after the above Original Game Idea section.

As I was developing the original ideas, I found many flaws in it, both technical and gameplay.
One of the biggest ones was the robotic arm. The arm had to be big enough to be maneuverable, but small enough to not interfere with the submarines movement. No matter what I tried, it was either too frustrating for the "pilot" of the submarine to control, or too difficult for the arm's controller to make any meaningful progress, so I decided to scrap the arm idea.

Instead of an arm, players entered a POI through an airlock (after a docking procedure).
Depending on what phase the game was at, players were tasked with different things to do.
You proceed to the next phase by docking at the next POI.

  • Phase 1: Recipe Phase
    • Players are tasked with finding a USB stick which contains the recipes for the chemicals they must make.
  • Phase 2: Looting Phase
    • Players need to complete a series of minigames on a terminal computer, some requiring teamwork, to open locked doors where they can find the resources required to create the chemical they need.
  • Phase 3: Crafting and Completion
    • Players have a few machines in their submarine to help them in crafting chemicals.
      • Combiner (combines 2 chemicals together)
      • Centrifuge
      • Evaporator
    • After plugging in the USB with the recipe into their submarine terminal, they can see the steps required to make the chemicals
    • Once the players have created the chemicals, they can submit them to the final POI successfully to continue playing.

Highlights

Tried to make the "interior" submarine match the rotation of the "moveable" submarine.
The test was an astounding failure.

After making a robust interaction system that worked very well across all clients, I added a physics-based valve rotation system that was also fully synced across all clients.

The valves are physics-based, so collisions can prevent rotations!

Added a fluid shader with basic liquid physics with the help of this free resource from Minions Art

Used Ogjee's industrial structure generator for geometry nodes to create the spaghetti of pipes inside the submarines interior

Added an airlock to allow players to board POIs

Added a pretty ugly character model with synced animations and head pitch
undefined - Imgur (1).gif

Modified Sebation League's Perlin noise terrain generator to create an enclosed space.
Added a collision-based minimap for navigation
undefined - Imgur (2).gif
Also added a little cyan line to point the submarine to the next POI.
Note the colour-banding, framerate, and screen-tearing are not .gif artifacts, but the visual style I was aiming for with this minimap.

Added storage of chemical bottles with shelves and filing cabinets
Pasted image 20250119145631.png

With the modelling help of my friend Victor, I added a terminal with minigames that is fully synced across all clients

Takeaways

The key thinks I learned and would improve regarding this project.

What I Learned

  • I became far more skilled in Unity networking using Photon Pun 2
    • Especially syncing things further than physics objects and player movement, such as UnityEvents and GUI
  • Although Blenders geometry nodes are still fairly new, they are very useful, and there are many free resources online that can help you make a finished model faster

Future Improvements

  • Scope. I should've stuck with a simpler game idea we came up with during our stressful thinking sessions.
  • Idea clarity. Related to scope, but since the idea for this project was fairly sporadic, the idea wasn't fully thought-out, so I often had to majorly rethink systems, wasting precious time.